package com.zack.shop.mvp.http.entity;

import com.zack.shop.mvp.http.api.Api;

import java.util.List;

/**
 * Created by Administrator on 2018/7/11.
 */

public class BaseGoodBean<P> {
    private int status;
    private String msg;
    private List<P> data;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<P> getData() {
        return data;
    }

    public void setData(List<P> data) {
        this.data = data;
    }

    /**
     * 请求是否成功
     *
     * @return
     */
    public boolean isSuccess() {
        if (status == Api.RequestSuccess) {
            return true;
        } else {
            return false;
        }
    }

}
